package com.guan.ordering_sys.generator.service.impl;

import com.guan.ordering_sys.generator.entity.GoodsType;
import com.guan.ordering_sys.generator.mapper.GoodsTypeMapper;
import com.guan.ordering_sys.generator.service.GoodsTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guan.ordering_sys.vo.GoodsTypeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 关远键
 * @since 2021-06-18
 */
@Service
public class GoodsTypeServiceImpl extends ServiceImpl<GoodsTypeMapper, GoodsType> implements GoodsTypeService {

    @Autowired
    private GoodsTypeMapper goodsTypeMapper;

    @Override
    public List<GoodsTypeVo> getAll() {
        return goodsTypeMapper.queryAll();
    }

    @Override
    public GoodsTypeVo findByName(String name) {
        return goodsTypeMapper.findByName(name);
    }
}
